#! /usr/bin/env python
# -*- coding: utf-8 -*-

"""
 *
 * - Ime
 *
 *  - kratki opis
 *
 * Autori: Koki007
 * Verzija: 0.1
 * Datum: 05.01.2011
 *
"""

import pygame
from pygame.locals import *
from sys import exit

from GUI_label import cGUI_label

pygame.init()

glavni_buffer = pygame.display.set_mode((800, 600), DOUBLEBUF)

glavna_petlja = True

GUI_element = cGUI_label(100, 100, "", "tile_2.png")

while glavna_petlja == True:

    # INPUT
    for event in pygame.event.get():
        if event.type == QUIT:
            exit()

        if event.type == KEYDOWN:

            if event.key == K_ESCAPE:
                glavna_petlja = False

    GUI_element.primi_event(event)

    # AZURIRANJE
    GUI_element.azuriraj()

    # CRTANJE
    glavni_buffer.fill((0, 50, 0))
    GUI_element.crtaj(glavni_buffer)
    pygame.display.flip()
